package com.rui.patterns.combination;

/**
 * @author : [锐神NO.3]
 * @version : [v1.0]
 * @className : MenuItem
 * @createTime : [2022/2/23 15:37]
 * @description : [描述该类的功能]
 */

public class MenuItem extends MenuComponent {

    public MenuItem(String name, int level){
        this.name = name;
        this.level = level;
    }

    @Override
    public void print() {
        //打印菜单项的名称
        System.out.println(name);
    }
}
